<!--图片预览-->
<template>
    <Modal
            fullscreen
            v-model="visible"
            :title="t"
            :key="key"
            :loading="Loading"
    >
        <div id="img">
            <img :src="url"/>
        </div>
        <div slot="footer">
            <Button @click="cancel">取消</Button>
        </div>
    </Modal>
</template>

<script>

    export default {
        components: {},
        data() {
            return {
                visible: false,
                title: '',
                Loading: false,
                url: '',
                key: '',
                t: '图片预览'
            }
        },
        methods: {
            cancel() {
                this.visible = false;
            },
            edit(row) {
                this.url = row.DOCS0002;
                this.visible = true;

            },

        }
    }
</script>

<style scoped>
    #img {
        text-align: center;
        width: 99%;
        position: absolute;
        overflow-y: auto;
    }

    img {
        max-width: 100%;
        height: auto;
    }
</style>